import { createEnum, s_createEnum } from "@/utils/EnumUtils";



export const USER_DEFAULT_AVATAR ="/api/images/avatar_default.png";

export const NOVEL_DEFAULT_COVER = "/api/images/cover_default.png";

export const HEADER_FIELD_AUTH = 'Authorization';

export const LOGIN_ROUTE_PATH = '/user/login';

export enum ErrorCode {
  OK = 0,

  PARAMS_400 = 40000,
  NOT_LOGIN_401 = 40100,
  NOT_AUTH_401 = 40101,
  FORBIDDEN_403 = 40300,
  NOT_FOUND_404 = 40400,

  SYSTEM_500 = 50000,
  OPERATION_500 = 50001,
}



// 状态:  0未发布 -> 1审核中(已发布) -> 2审核成功(成功发布) -> 3 审核不通过

export const EnumChapterStatus = s_createEnum({
  NOT_PUBLISH: [0, '未发布'],
  REVIEWING: [1, '审核中'],
  PUBLISHED: [2,'审核通过'],
  FAIL: [3,'审核不通过'],
} as const )  ;
